package com.xnfh.equipment.viewmodel.base

import com.xnfh.common.bean.EquipmentToken
import com.xnfh.common.bean.EquipmentTokenV1
import com.xnfh.framework.bean.RespStateData
import com.xnfh.network.base.BaseRepository
import com.xnfh.network.manager.ApiManager

/**
 * @Description:
 * @Author: ziheng
 * @CreateDate: 2023/12/27 14:22
 * @UpdateUser: ziheng
 * @UpdateDate: 2023/12/27 14:22
 * @UpdateRemark: 更新说明
 */
open class BaseTokenViewModelRes: BaseRepository() {


    suspend fun requestKcTokenV1(data: RespStateData<EquipmentTokenV1>) = dealResp(
        { ApiManager.api.requestApiTokenV1() }, data
    )

    suspend fun requestKcTokenV2(data: RespStateData<EquipmentToken>) = dealResp(
        { ApiManager.api.requestApiToken() }, data
    )
}